// pages/components/new-data/new-data.js
 
Component({
  /**
   * 组件的属性列表
   */
  properties: {
     show: {
       type: Boolean,
       value: false
     },
     dataSource: {
       type: Array | undefined,
       value: [],
       observer: 'setDataSource'
     },
     factorValue: {
       type: Array,
       value: [] 
     }
  },

  /**
   * 组件的初始数据
   */
  data: {
    popupState: false,
    popupEvent: {},
    data: []
  },
  lifetimes: {
    attached: function() {
      // 在组件实例进入页面节点树时执行
    }
  },
  /**
   * 组件的方法列表
   */
  methods: {
     onClose() {
      this.triggerEvent('onClose')
     },
     onClick(event) {
       const id = event.currentTarget.dataset.id;
      const data = JSON.stringify(this.properties.factorValue);
      wx.navigateTo({
        url: '../../pages/material/index?id=' + id + '&params=' + encodeURIComponent(data) ,
      })
     },
     setDataSource(data) {
    
     },
 
     onSubmit({detail}) {
      this.triggerEvent('onSubmit', detail);
     }
  }
})